<form id="<?php echo $uniqid;?>" method="post" style="padding: 8px;">
    <table border="0" width="100%" cellspacing="1" cellpadding="5" class="formtable">
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">反馈ID：</td>
            <td width="80%">{{params.id}}</td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">反馈会员ID：</td>
            <td width="80%">{{params.user_id}}</td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">反馈会员昵称：</td>
            <td width="80%">{{params.member.nickname}}</td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">反馈类型：</td>
            <td width="80%">{{params.type_name}}</td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">反馈联系电话：</td>
            <td width="80%">{{params.phone}}</td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">反馈内容：</td>
            <td width="80%">
                <div>
                    <li style="white-space: normal; word-break: break-word; line-height: 30px;">{{params.content}}</li>
                    <li style="display: flex; justify-content: space-between; flex-wrap:wrap;" v-if="params.images.length">
                        <img :src="imgsrc" style="max-width: 46%" v-for="(imgsrc,index) in params.images" />
                    </li>
                </div>
            </td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">状态：</td>
            <td width="80%">{{params.status_name}}</td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">处理意见：</td>
            <td width="80%">
                <div style="line-height: 30px" v-if="params.status == 1">{{params.remark}}</div>
                <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 10}" placeholder="请处理意见" size="small" v-model="params.remark" v-else></el-input>
            </td>
        </tr>
        <tr bgcolor="#FFFFFF" v-if="params.status == 1">
            <td class="tlabel">处理管理员信息：</td>
            <td width="80%">
                <div>
                    <li style="line-height: 30px"><label>处理管理员ID：</label>{{params.oper_id}}</li>
                    <li style="line-height: 30px"><label>处理管理员：</label>{{params.oper.username}}</li>
                    <li style="line-height: 30px"><label>处理时间：</label>{{params.updated_at}}</li>
                </div>
            </td>
        </tr>
    </table>
</form>
<script>
    var feedbackHandelVm = new Vue({
        el: '#<?php echo $uniqid;?>',
        data: {
            params: JSON.parse('<?php echo addslashes($dataset);?>'),
            submitParams:{
                id:0,
                remark:''
            },
        },
        methods: {
            submit: function () {
                if(this.params.id <= 0){
                    $.messager.alert('提示', '参数出错', 'warning');
                    $("#feedbackdlg").dialog('close');
                    return;
                }
                if(this.params.remark === ''){
                    $.messager.alert('提示', '请输入请处理意见', 'warning');
                    return;
                }
                this.submitParams.id = this.params.id;
                this.submitParams.remark = this.params.remark;
                $.post('/admin/feedback/handle', this.submitParams, function (data) {
                    if (data.ret === 0) {
                        $.messager.show({
                            title: '提示',
                            msg: data.msg,
                            timeout: 3000,
                            showType: 'slide'
                        });
                        $('#<?php echo $uniqid;?>').form('clear');
                        $("#feedbackdlg").dialog('close');
                        feedbackReload(true);
                    } else {
                        $.messager.alert('提示', data.msg, 'warning');
                    }
                }, 'json');
            }
        }
    });
    $(function () {
        $('#feedbackHandelsubmit').click(function (data) {
            feedbackHandelVm.submit();
        });
    });
</script>
